package com.bootdo.thread;

/**
 * @Auther: liuj
 * @Date: 2019/5/12 20:03
 * @Description:
 */
public class MyThread extends Thread {
    @Override
    public void run() {
        System.out.println(getName());
        super.run();
    }

    public static void main(String[] args){
        for(int i=0; i<10; i++){
            new MyThread().start();
        }

        new Thread(){
            @Override
            public void run() {

                for(int x=0; x<10; x++){
                    System.out.println(Thread.currentThread().getName() + ":" + x);
                }
                super.run();
            }
        }.start();
    }
}
